}
#endif
-#ifdef HAVE_GPGME
gboolean
ostree_repo_sign_commit (OstreeRepo *self,
const gchar *commit_checksum,
GCancellable *cancellable,
GError **error)
{
+#ifdef HAVE_GPGME
gboolean ret = FALSE;
gs_unref_object GFile *commit_path = NULL;
gs_unref_variant GVariant *metadata = NULL;
if (signature_file)
g_mapped_file_unref (signature_file);
return ret;
+#else
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+ "This version of ostree was compiled without GPG support");
+ return FALSE;
+#endif
}
/**
GCancellable *cancellable,
GError **error)
{
+#ifdef HAVE_GPGME
gboolean ret = FALSE;
gs_unref_object OstreeGpgVerifier *verifier = NULL;
gs_unref_variant GVariant *commit_variant = NULL;
if (commit_tmp_path)
(void) gs_file_unlink (commit_tmp_path, NULL, NULL);
return ret;
-}
-
+#else
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+ "This version of ostree was compiled without GPG support");
+ return FALSE;
#endif
+}
GCancellable *cancellable,
GError **error);
-#ifdef HAVE_GPGME
gboolean ostree_repo_sign_commit (OstreeRepo *self,
const gchar *commit_checksum,
const gchar *key_id,
GFile *extra_keyring,
GCancellable *cancellable,
GError **error);
-#endif
G_END_DECLS